package com.sgcc.system.api.factory;

import java.util.ArrayList;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.sgcc.common.core.web.page.TableDataInfo;
import com.sgcc.system.api.RemoteJjrglService;

import feign.hystrix.FallbackFactory;

/**
 * 用户服务降级处理
 * 
 * @author sgcc
 */
@Component
public class RemoteJjrglFallbackFactory implements FallbackFactory<RemoteJjrglService>
{
    private static final Logger log = LoggerFactory.getLogger(RemoteJjrglFallbackFactory.class);

    @Override
    public RemoteJjrglService create(Throwable throwable)
    {
        log.error("用户服务调用失败:{}", throwable.getMessage());
        return new RemoteJjrglService()
        {

			@Override
			public TableDataInfo findIsJjr(String date) {
				// TODO Auto-generated method stub
				TableDataInfo table=new TableDataInfo();
				table.setRows(new ArrayList<>());
				return  table;
			}
           
			
        };
    }
}
